﻿<!DOCTYPE html>

<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <link href="css/bootstrap.css" rel="stylesheet" />
    <script src="js/jquery_2_1_min.js"></script>
    <script src="js/bootstrap.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/vue"></script>
    <script src="js/FastHttpApi.js"></script>
    <script src="js/api.js"></script>
    <title>
    </title>
</head>
<body>
    <div class="container bs-docs-container">
        <div class="row">

            <div class="col-md-9" role="main">
                <nav class="navbar navbar-default">
                    <div class="container-fluid">
                        <!-- Brand and toggle get grouped for better mobile display -->
                        <div class="navbar-header">
                            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                                <span class="sr-only"></span>
                                <span class="icon-bar"></span>
                                <span class="icon-bar"></span>
                                <span class="icon-bar"></span>
                            </button>
                            <a class="navbar-brand" href="#">FastHttpApi http and websocket api</a>
                        </div>

                        <!-- Collect the nav links, forms, and other content for toggling -->

                    </div><!-- /.container-fluid -->
                </nav>
                <ul class="nav nav-tabs">
                    <li role="presentation"><a href="/">Orders</a></li>
                    <li role="presentation" class="active"><a href="/Employees.html">Employees</a></li>
                </ul>
                <div class="panel panel-default">
                    <div class="panel-body">
                        <table class="table">
                            <thead>
                                <tr>
                                    <th>#</th>
                                    <th>FirstName</th>
                                    <th>LastName</th>
                                    <th>Address</th>
                                    <th>City</th>
                                    <th>HomePhone</th>
                                </tr>
                            </thead>
                            <tbody id="lstbody">
                                <tr v-for="item in Data">
                                    <td></td>
                                    <td><a v-bind:href="['EmployeeEditor.html?id='+item.EmployeeID]">{{item.FirstName}}</a></td>
                                    <td>{{item.LastName}}</td>
                                    <td>{{item.Address}}</td>
                                    <td>{{item.City}}</td>
                                    <td>{{item.HomePhone}}</td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
<script>
   
    $(document).ready(function () {
        Init()
    });

    async function Init() {
        var result = await HomeListEmployees();
        var empsBlock = new Vue({
            el: '#lstbody',
            data: result
        });
    }

</script>
</html>